import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import {PayrollDetailImportForm} from '@/index';

/**
 * 新增考勤明细列表
 */
 export function addWagePayrollDetails(id:number,data:any) {
    let url;
    switch (localStorage.getItem("usertypeName")) {
      case "Manager":
        url = "/api/v1/manager/wagepayrolldetail/addWagePayrollDetails/"+id;
        break;
    //   case "Corp":
    //     url = "/api/v1/corp/checkindetail/create";
    //     break;
    //   case "Constructor":
    //     url = "/api/v1/constructor/checkindetail/create";
    //     break;
    //   case "Commander":
    //     url = "/api/v1/commander/checkindetail/create";
    //     break;
    //   case "SysUser":
    //     url = "/api/v1/sysuser/checkindetail/create";
    //     break;
    }
    return request({
      url: url,
      method: "post",
      data: data,
    });
  }


  /**
 * 提交工资单信息
 */
export function submitPayroll(id:number) {
    return request({
      url: "/api/v1/manager/wagepayroll/submit/" + id,
      method: "post",
    });
  }